<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>
 Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="jslog.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>jslog.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		No overview generated for 'jslog.js'<BR/><BR/>
	
</p>

<hr>


    <table border="1" cellpadding="3" cellspacing="0" width="100%">
    <tr bgcolor="#CCCCFF" class="TableHeadingColor">
    <td colspan=2><font size="+2">
    
        <b>Class Summary</b>
    
    </font></td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="jslog.html">jslog</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    </table>
    <hr/> 


<!-- ========== METHOD SUMMARY =========== -->

	<a name="method_summary"><!-- --></a>
	<table border="1" cellpadding="3" cellspacing="0" width="100%">
		<tr bgcolor="#CCCCFF" class="TableHeadingColor">
			<td colspan=2>
				<font size="+2">
					<b>Method Summary</b>
				</font>
			</td>
		</tr>
	
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;<a href="Object.html">Object</a></code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!createDisplayRow">createDisplayRow</a></b>(sLevel, sMsg)
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;<a href="Object.html">Object</a></code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!getCurrentTimeFormatted">getCurrentTimeFormatted</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!initializeDisplay">initializeDisplay</a></b>()
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;void</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!logMsg">logMsg</a></b>(level,msg)
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 
		      </td>
		   </tr>
		
	
	</table>
    <p>

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="comment">/*
Copyright (c) 2005, Andre Lewis, andre<span class="attrib">@earthcode</span>.com
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided 
that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    * Neither the name of "Andre Lewis" nor the names of contributors to this software may be used to endorse or promote products derived from this software without specific prior written permission. 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/</span>

<span class="comment">/*
jslog.js

Tokens placed in global namespace:
	EC -- a container for all things EarthCode. EF.F contains utility functions used across multible Earthcode projects.
	jslog -- the logger itself, with debug(), info(), warning(), error(), and text() methods
 debug -- a convenience method placed in the root to save you a few keystrokes for the often-used debug method.
	
Example Use:
jslog.info("Information here!");	 debug("Here's some debug info"); // this is shorthand

To Utilize, include just one file:
	&lt;script language="JavaScript" src="/scripts/jslog.js"&gt;&lt;/script&gt;
	
To Utilize drag-and-drop, include these before including jslog.js:
	&lt;script language="JavaScript" src="/scripts/lib/prototype.js"&gt;&lt;/script&gt;
	&lt;script language="JavaScript" src="/scripts/lib/scriptaculous/scriptaculous.js"&gt;&lt;/script&gt;

More information at http://www.earthcode.com/tools/jslog

Created by Andre Lewis 12/05
*/</span>

<span class="reserved">if</span> (EC == null || typeof(EC) != <span class="literal">"object"</span>) { var EC = new Object();}
<span class="reserved">if</span> (EC.F == null || typeof(EC.F) != <span class="literal">"object"</span>) { EC.F = new Object();}

<span class="comment">/*
NOTE: here we are defining several functions which ALSO exist in the foundation library. They are defined here
so the debugging file can be completely self-contained. 
*/</span>
<span class="reserved">if</span> (EC.F[<span class="literal">"setCookie"</span>] == null) {
	<span class="comment">/*
	 Method to set a cookie.
	*/</span>
	EC.F.setCookie = <span class="reserved">function</span> (name, value) {  
		var cookietext = name + <span class="literal">"="</span> + escape(value);
		document.cookie = cookietext;
		<span class="reserved">return</span> null;
	} <span class="comment">// end of setCookie function</span>

	<span class="comment">/*
	 Method to get a cookie.
	*/</span>
	EC.F.getCookie = <span class="reserved">function</span> (Name) {
		var search = Name + <span class="literal">"="</span>;
		var CookieString = document.cookie;
		var result = null;
		<span class="reserved">if</span> (CookieString.length &gt; 0) {
			offset = CookieString.indexOf(search);
			<span class="reserved">if</span> (offset != -1) {
				offset += search.length;
				end = CookieString.indexOf(<span class="literal">";"</span>, offset);
				<span class="reserved">if</span> (end == -1){
					end = CookieString.length;
				}
				result = unescape(CookieString.substring(offset, end));
			} 
		}
		<span class="reserved">return</span> result                                
	} <span class="comment">// end of getCookie function</span>
} 

var jslog = new <span class="reserved">function</span> () {
	bPersistState = true;
	<span class="comment">/*------------------------------------------------------------------------------------
	 Namespacing
	 ------------------------------------------------------------------------------------*/</span>	
	var sNamespace=<span class="literal">"ec_debug_logging"</span>;
	var sInstance=<span class="literal">"jslog"</span>;
	var sDOMInstance=sNamespace+<span class="literal">"_"</span>+sInstance;


	<span class="comment">// *** START Configuration ***</span>
	var Config_Enabled = true;
	<span class="comment">// *** END Configuration ***</span>

	<span class="reserved">if</span>(Config_Enabled == false &amp;&amp; location.href.match(/enablejslog/)) {
		Config_Enabled = true;
	}
	
	var bLoggerConfigured=false;
	var nNumMsgsLogged = 0;	
	
	<span class="comment">// Helpers</span>
	<span class="reserved">function</span> $(o){<span class="reserved">return</span> document.getElementById(o)};
	
	<span class="comment">/*------------------------------------------------------------------------------------
	 Public Methods
	 ------------------------------------------------------------------------------------*/</span>

	<span class="reserved">function</span> debug(msg) {
		logMsg(<span class="literal">"DEBUG"</span>,msg);
	}
	<span class="reserved">function</span> info(msg) {
		logMsg(<span class="literal">"INFO"</span>,msg);
	}
	<span class="reserved">function</span> warning(msg) {
		logMsg(<span class="literal">"WARN"</span>,msg);
	}
	<span class="reserved">function</span> error(msg) {
		logMsg(<span class="literal">"ERROR"</span>,msg);
	}
   	
   	<span class="comment">// This method toggles the on-screen display div on or off as needed</span>
	<span class="reserved">function</span> toggleDisplay() {
		var oBody = $(sDOMInstance+<span class="literal">'_body'</span>);
		<span class="reserved">if</span> (oBody.style.display == <span class="literal">'none'</span>) {
			oBody.style.display = <span class="literal">'block'</span>;
		} <span class="reserved">else</span> {
			oBody.style.display = <span class="literal">'none'</span>;
		}

		<span class="reserved">if</span> (bPersistState) {
			EC.F.setCookie(sInstance+<span class="literal">"_visibility"</span>,oBody.style.display);
		}		
		
	}
	
	<span class="comment">// this function clears the on-screen display</span>
	<span class="reserved">function</span> clearLog() {
		$(sDOMInstance+<span class="literal">'_logDisplay'</span>).innerHTML = <span class="literal">''</span>;
		nNumMsgsLogged = 0;
		$(sDOMInstance+<span class="literal">'_handle'</span>).innerHTML=nNumMsgsLogged;
	}
	
	<span class="comment">/* 
	Public method to programmatically enable jslog, even if it's turned off via the config.
	Use this if you want jslog generally turned off, but turned on for one specific page.
	
	If the logger is already enabled, does nothing.
	*/</span>
	<span class="reserved">function</span> enable() {
		<span class="reserved">if</span> (!bLoggerConfigured) {
			initializeDisplay();
		}
	}
	
	<span class="comment">/*
	Public method to set any amount of text into the text area
	*/</span>
	<span class="reserved">function</span> text(sText) {
		$(sDOMInstance+<span class="literal">"_textArea"</span>).value=sText;
	}
	<span class="comment">/* 
	Public method to try to get the innerHTML of the element identified in the text input box, and place it into the clipboard
	from view.
	*/</span>
	<span class="reserved">function</span> getHTML () {
		var sIdToInspect = $(sDOMInstance+<span class="literal">"_idToInspect"</span>).value;

		<span class="reserved">if</span> (sIdToInspect == <span class="literal">""</span> ) {
			warning(<span class="literal">"Provide a non-blank id"</span>);
		} <span class="reserved">else</span> {
			try {
				<span class="comment">// get the element with the id entered, copy its outerHTML to a hidden text area, and then transfer it to the clipboard</span>
				var oTextArea = $(sDOMInstance+<span class="literal">"_textArea"</span>).value = $(sIdToInspect).innerHTML;
				info(sIdToInspect+<span class="literal">" innerHTML is now in the text box below!"</span>);				
			} catch(e) {
				error(<span class="literal">"Could not get innerHTML of id="</span>+sIdToInspect+<span class="literal">": "</span>+e.message);
			}
			<span class="comment">// finally, persist the id that was entered in a cookie</span>
			EC.F.setCookie(sInstance+<span class="literal">"_idToInspect"</span>,sIdToInspect);
		}
	}
		
	
	<span class="comment">// Specify the methods that are to be public here. This is what exposes them publicly</span>
	<span class="reserved">this</span>.debug=debug;	
	<span class="reserved">this</span>.info=info;
	<span class="reserved">this</span>.warning=warning;
	<span class="reserved">this</span>.error=error;
	<span class="reserved">this</span>.toggleDisplay=toggleDisplay;	
	<span class="reserved">this</span>.clearLog=clearLog;		
	<span class="reserved">this</span>.text=text;
	<span class="reserved">this</span>.enable = enable;
	<span class="reserved">this</span>.getHTML = getHTML
	
	<span class="comment">/*------------------------------------------------------------------------------------
	 Private Methods
	 ------------------------------------------------------------------------------------*/</span>	
	
	<span class="comment">//This function logs a message. All the level-specific methods (logger.debug, etc.) turn around and call this methods</span>
	<span class="reserved">function</span> logMsg(level,msg) {
		<span class="reserved">if</span> (Config_Enabled) {
			<span class="comment">// increase the count in the handle</span>
			nNumMsgsLogged +=1;
			$(sDOMInstance+<span class="literal">'_handle'</span>).innerHTML=nNumMsgsLogged;
			<span class="comment">// Append the log to a display div so it can be seen right away</span>
			var oDisplay =$(sDOMInstance+<span class="literal">'_logDisplay'</span>);
			<span class="reserved">if</span> (oDisplay.childNodes.length == 0 ) {
				oDisplay.appendChild(createDisplayRow(level,msg));
			} <span class="reserved">else</span> {
				oDisplay.insertBefore(createDisplayRow(level,msg),oDisplay.childNodes[0]);
			}
  	} <span class="comment">// end of is config enabled</span>
 	}

	<span class="comment">// this private method creates the row to add the the display div. It generates what actually gets shown </span>
	<span class="comment">// in the appropriate div each time there's a logged event</span>
	<span class="reserved">function</span> createDisplayRow(sLevel, sMsg) {
		<span class="reserved">if</span> (document.all) { <span class="comment">// very basic browser detection</span>
			var sFloat=<span class="literal">"styleFloat"</span>; <span class="comment">//ie</span>
		} <span class="reserved">else</span> {
			var sFloat=<span class="literal">"cssFloat"</span>; <span class="comment">//firefox</span>
		}
		var oRes = document.createElement(<span class="literal">"div"</span>);
		<span class="reserved">if</span> (nNumMsgsLogged/2 == Math.floor(nNumMsgsLogged/2)) {
			oRes.style.backgroundColor=<span class="literal">"#FFF"</span>;
		} <span class="reserved">else</span> {
			oRes.style.backgroundColor=<span class="literal">"#F6F6F6"</span>;
		}
		oRes.style.borderBottom=<span class="literal">"1px solid #AAA"</span>;
		oRes.style.verticalAlign=<span class="literal">"top"</span>;
		var oSev=document.createElement(<span class="literal">"div"</span>);
		oSev.style.width=<span class="literal">"40px"</span>;
		oSev.style.paddingLeft=<span class="literal">"3px"</span>;
		oSev.style[sFloat]=<span class="literal">"left"</span>;
		
		<span class="comment">// different styles for different severities</span>
		<span class="reserved">if</span> (sLevel == <span class="literal">"DEBUG"</span>) {
			oSev.style.backgroundColor=<span class="literal">"#1515FF"</span>;
		} <span class="reserved">else</span> <span class="reserved">if</span> (sLevel == <span class="literal">"INFO"</span>) {
			oSev.style.backgroundColor=<span class="literal">"#10FF10"</span>;
		} <span class="reserved">else</span> <span class="reserved">if</span> (sLevel == <span class="literal">"WARN"</span>) {
			oSev.style.backgroundColor=<span class="literal">"yellow"</span>;
		} <span class="reserved">else</span> <span class="reserved">if</span> (sLevel == <span class="literal">"ERROR"</span>) {
			oSev.style.backgroundColor=<span class="literal">"#FF7070"</span>;
		}
		
		oSev.appendChild(document.createTextNode(sLevel));
		oRes.appendChild(oSev);
		var oTime= document.createElement(<span class="literal">"span"</span>);
		oTime.style.paddingLeft=<span class="literal">"3px"</span>;
		oTime.style.paddingRight=<span class="literal">"8px"</span>;
		oSev.style[sFloat]=<span class="literal">"left"</span>;				
		oTime.appendChild(document.createTextNode(getCurrentTimeFormatted()));
		oRes.appendChild(oTime);
		
		oRes.appendChild(document.createTextNode(sMsg));
		
		var oClear=document.createElement(<span class="literal">"div"</span>);
		oClear.style.clear=<span class="literal">"both"</span>;
		oRes.appendChild(oClear);
		
		<span class="reserved">return</span> oRes;
	}

	<span class="comment">// this private method returns the current date formated properly with a nice AM/PM</span>
	<span class="reserved">function</span> getCurrentTimeFormatted() {
		var now = new Date();
		var hours = now.getHours();
		var minutes = now.getMinutes();
		var seconds = now.getSeconds()
		var timeValue = <span class="literal">""</span> + ((hours &gt;12) ? hours -12 :hours);
		<span class="reserved">if</span> (timeValue == <span class="literal">"0"</span>) timeValue = 12;
		timeValue += ((minutes &lt; 10) ? <span class="literal">":0"</span> : <span class="literal">":"</span>) + minutes;
		timeValue += ((seconds &lt; 10) ? <span class="literal">":0"</span> : <span class="literal">":"</span>) + seconds;
		timeValue += (hours &gt;= 12) ? <span class="literal">" PM"</span> : <span class="literal">" AM"</span>;
		
		<span class="reserved">return</span> timeValue;
	}

	<span class="reserved">if</span> (Config_Enabled) {
		initializeDisplay();
	}
	
	<span class="comment">/*------------------------------------------------------------------------------------
	 Initialization code. It's wrapped in a try-catch block because if something here
	 fails, there is no other notification
	 ------------------------------------------------------------------------------------*/</span>
	<span class="reserved">function</span> initializeDisplay() {		
		<span class="reserved">if</span> (!bLoggerConfigured) {
			<span class="comment">// Create the display div if necessary. This writes directly to the document to create the UI for the logger.</span>
			<span class="comment">// Note also that there are onclick events here, which call back to the public methods of the class.</span>
			try {

				<span class="comment">// default positions if other positions are not available</span>
				var nTop=2;
				var nLeft=2;
				var sDisplay=<span class="literal">"none"</span>;
							
				<span class="reserved">if</span> (bPersistState) {
					try {
						var sPersistString = EC.F.getCookie(sInstance+<span class="literal">"_position"</span>);
						<span class="reserved">if</span> (sPersistString != null) {
							var aTemp = sPersistString.split(<span class="literal">"|"</span>);
							<span class="reserved">if</span>(!isNaN(parseInt(aTemp[0]))) {
								nLeft = aTemp[0];
							}
							<span class="reserved">if</span>(!isNaN(parseInt(aTemp[1]))) {
								nTop = aTemp[1];
							}

						} 
						
						<span class="reserved">if</span>(EC.F.getCookie(sInstance+<span class="literal">"_visibility"</span>) == <span class="literal">"block"</span>) {
							sDisplay=<span class="literal">"block"</span>;
						}
					} 	catch (e) {
						<span class="comment">// nullop, just leave the arguments as the default</span>
					}	
				} <span class="comment">// end if bPersistState</span>
				
				var sIdToInspect = EC.F.getCookie(sInstance+<span class="literal">"_idToInspect"</span>);
				sIdToInspect = sIdToInspect==null?<span class="literal">""</span>:sIdToInspect;			
	
				document.write(<span class="literal">'&lt;div id="'</span>+sDOMInstance+<span class="literal">'_container" style="font-family:arial; color:black; font-size:9px; line-height:normal; letter-spacing: normal; position:absolute; z-index:10000;top:'</span>+nTop+<span class="literal">'px; left:'</span>+nLeft+<span class="literal">'px; "&gt;'</span>+
								 <span class="literal">'&lt;div id="'</span>+sDOMInstance+<span class="literal">'_handle" style="cursor:move; position: absolute; background-color:#FFFFCC; border:1px solid #FF0400; color:black; padding:2px;" ondblclick="'</span>+sInstance+<span class="literal">'.toggleDisplay()"&gt;0&lt;/div&gt;'</span>+
								 <span class="literal">'&lt;div id="'</span>+sDOMInstance+<span class="literal">'_body" style="text-align:left; border:1px solid #FF0400; width:300px; position: absolute; top:20px; left:0px; background-color:white; display:'</span>+sDisplay+<span class="literal">'"&gt;'</span>+
								 <span class="literal">'&lt;div id="'</span>+sDOMInstance+<span class="literal">'_header" style="height:10px; padding:2px; border-bottom:1px solid black; background-color:#FFFFCC;"&gt;'</span>+
								 <span class="literal">'&lt;span id="'</span>+sDOMInstance+<span class="literal">'_clear" style="color: blue;" onclick="'</span>+sInstance+<span class="literal">'.clearLog()"&gt;clear&lt;/span&gt;'</span>+
								 <span class="literal">'&lt;/div&gt;'</span>+
								 <span class="literal">'&lt;div id="'</span>+sDOMInstance+<span class="literal">'_logDisplay" style="height:240px; overflow:auto;"&gt;&lt;/div&gt;'</span>+
								 <span class="literal">'&lt;div id="'</span>+sDOMInstance+<span class="literal">'_footer" style="padding-left:2px; border-top:1px solid black; background-color:#FFFFCC;"&gt;'</span>+
								 <span class="literal">'get html:&lt;input id="'</span>+sDOMInstance+<span class="literal">'_idToInspect" style="font-size:9px; height:18px;" value="'</span>+sIdToInspect+<span class="literal">'" size=42/&gt; &lt;span id="'</span>+sDOMInstance+<span class="literal">'_go" style="color: blue;" onclick="'</span>+sInstance+<span class="literal">'.getHTML()"&gt;go&lt;/span&gt;'</span>+
								 <span class="literal">'&lt;textarea id="'</span>+sDOMInstance+<span class="literal">'_textArea" style="width:99%; font-size:9px;"&gt;&lt;/textarea&gt;'</span>+
								 <span class="literal">'&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'</span>);

			 	$(sDOMInstance+<span class="literal">"_clear"</span>).style.cursor=<span class="literal">"pointer"</span>;
			 	$(sDOMInstance+<span class="literal">"_go"</span>).style.cursor=<span class="literal">"pointer"</span>;
				
				<span class="comment">// Check if the draggable library is provided. This would be true if the appropriate libraries</span>
				<span class="comment">// are included in the page via a &lt;script&gt; tag</span>
				<span class="reserved">if</span> (window[<span class="literal">'Draggable'</span>] != null) {
					<span class="comment">// draggable is available, so use it!</span>
					new Draggable(sDOMInstance+<span class="literal">'_container'</span>,{handle:sDOMInstance+<span class="literal">'_handle'</span>, revert:false, 
						starteffect:false, endeffect:false});

					<span class="comment">// if the persistState option is true, set up the listener as appropriate</span>
					<span class="reserved">if</span> (bPersistState) {
						var fMyDropListener = new <span class="reserved">function</span>() {
							<span class="reserved">this</span>.onStart = <span class="reserved">function</span>(){};
							<span class="reserved">this</span>.onEnd = <span class="reserved">function</span>(s,o) {
								<span class="reserved">if</span> (o.element.id == sDOMInstance+<span class="literal">"_container"</span>){
									var pos = Position.cumulativeOffset(o.element);
									EC.F.setCookie(sInstance+<span class="literal">"_position"</span>,+pos[0]+<span class="literal">"|"</span>+pos[1]);
								}
							}					
						}
						
						Draggables.addObserver(fMyDropListener);
					}
				} <span class="reserved">else</span> {
					<span class="comment">// Otherwise, it means sciptaculous is not included, and debug won't be draggable</span>
					<span class="comment">// change the cursor on the loggerHandle</span>
					$(sDOMInstance+<span class="literal">'_handle'</span>).style.cursor=<span class="literal">"pointer"</span>;
				}
				
				bLoggerConfigured=true; 
			} catch (e) {
				alert(<span class="literal">"Code-level error initializing jslog: "</span>+e.description);
			}
		} <span class="comment">// end of initializeDisplay</span>
	}
} 
debug=jslog.debug;
</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Wed Aug  1 15:38:25 2007</div>
</body>
</html>
